package cn.kgc.vue.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName log_info
 */
@TableName(value ="log_info")
@Data
@ExcelTarget("log_info")
public class LogInfo implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 操作人
     */
    @Excel(name = "操作人",orderNum = "1")
    private String username;

    /**
     * 用户ip   操作地点
     */
    @Excel(name = "操作地址",orderNum = "2")
    private String ip;

    /**
     * 参数
     */
    @Excel(name = "操作参数",orderNum = "3")
    private String params;

    /**
     * 资源路径
     */
    @Excel(name = "资源路径",orderNum = "4")
    private String url;

    /**
     * 操作描述
     */
    @Excel(name = "操作描述",orderNum = "5")
    private String description;

    /**
     * 创建时间
     */
    @Excel(name = "操作时间",orderNum = "8",exportFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 操作模块
     */
    @Excel(name = "操作模块",orderNum = "6")
    private String model;

    /**
     * 操作耗时
     */
    @Excel(name = "消耗时间",orderNum = "7")
    private Long timeConsuming;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}